Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OH2-409 | Add lock field to medical ward #1448

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

SteveGT96
Copy link
Contributor

@SteveGT96 SteveGT96 commented Nov 12, 2024

See OH2-409

@SilverD3
Copy link
Contributor

@SteveGT96 is it possible to add some tests to ensure that lock is effectively updated when we update a 'ward medical'?

Copy link
Collaborator

@dbmalkovsky dbmalkovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few minor comments

@@ -1106,7 +1107,7 @@ void testMgrValidateLotWithCostZero() {
Movement movement = movementIoOperationRepository.findById(code).orElse(null);
assertThat(movement).isNotNull();
Lot lot = movement.getLot();
lot.setCost(new BigDecimal(0.0));
lot.setCost(new BigDecimal("0.0"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lot.setCost(new BigDecimal("0.0"));
lot.setCost(BigDecimal.ZERO);

Comment on lines +61 to 65
@Version
@Column(name = "MDSRWRD_LOCK", columnDefinition = "INT(11) NOT NULL DEFAULT 0")
private int lock;
@Transient
private Double qty = 0.0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Version
@Column(name = "MDSRWRD_LOCK", columnDefinition = "INT(11) NOT NULL DEFAULT 0")
private int lock;
@Transient
private Double qty = 0.0;
@Version
@Column(name = "MDSRWRD_LOCK", columnDefinition = "INT(11) NOT NULL DEFAULT 0")
private int lock;
@Transient
private Double qty = 0.0;

public Lot getLot() {
return id.getLot();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave a line after the end of the method.

}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave a line after the end of the method.

public void setWard(Ward ward) {
this.id.setWard(ward);
}

public Medical getMedical() {
return this.id.getMedical();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave a line after the end of the method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants